Module-level declarations
Types
Link copied to clipboard
struct loot_item_dto
Link copied to clipboard
struct loot_item_info
Link copied to clipboard
entity loot_table
Link copied to clipboard
struct loot_table_dto
Link copied to clipboard
entity loot_table_item
Link copied to clipboard
struct register_loot_item_dto
Link copied to clipboard
enum reward_type
Functions
Link copied to clipboard
function _register_loot_table_item(reward_name: text, requested_weight: integer, reward_amount: integer, reward_type: reward_type, guaranteed_reward: boolean, loot_table: loot_table)
Link copied to clipboard
function _update_loot_table_item(reward_name: text, requested_weight: integer, reward_amount: integer, reward_type: reward_type, guaranteed_reward: boolean, loot_table: loot_table)
Link copied to clipboard
function map_to_loot_table_dto(name: text, total_not_guaranteed_rewards: integer, items: list<loot_table_item>): loot_table_dto
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function reward_loot_item(reward_name: text, loot_item_reward_type: reward_type, reward_amount: integer, account: account): loot_item_info
Link copied to clipboard
function reward_loot_items(loot_entries: list<loot_table_item>, account_id: byte_array): list<loot_item_info>
Link copied to clipboard
function weighted_random_selection(loot_entries: list<loot_table_item>, number_of_rewards: integer): list<loot_table_item>
Queries
Link copied to clipboard
@mount("loot_tables.get_loot_table_from_name")
query get_loot_table_from_name(loot_table_name: text): loot_table_dto
Link copied to clipboard
Operations
Link copied to clipboard
@mount("loot_tables.register_loot_table")
operation register_loot_table(name: text, number_of_rewards: integer, loot_items: list<register_loot_item_dto>)
Link copied to clipboard
@mount("loot_tables.register_loot_table_item")
operation register_loot_table_item(loot_table_name: text, loot_item: register_loot_item_dto)
Link copied to clipboard
@mount("loot_tables.update_loot_table_items")
operation update_loot_table_items(loot_table_name: text, loot_items: list<register_loot_item_dto>)